 <!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="apple-touch-fullscreen" content="yes">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">

        <title>轩盛商品方案</title>

        <link href="__CSS__/index.css" rel="stylesheet">


        <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
        <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
        <link href="__CSS__/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
        <link href="__CSS__/animate.min.css" rel="stylesheet">
        <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">
        <link href="__JS__/layui/css/layui.css"rel="stylesheet">
        
        <style>
         .table {table-layout:fixed;}
        </style>

    </head>
    <body>

<form class="layui-form" method="post" action="{:url('order/highlight')}" >
  

    <div id="export_word">

        <div style="height: 50px;"></div>

        <div id="scheme_name" class="text-center">
            <p style="font-size: 30px">为什么不挑选我</p>
        </div>

         <div style="height: 50px;"></div>

    <div class="container">
        <div class="table-responsive">

          <table class="table table-hover table-bordered table-striped">
           <tr>
                  <thead>
                    <tr>

                      <th class="tablefinal">
                        <div>原因</div>
                      </th>

                      <th class="tablefinal">
                        <div>商品名称</div>
                      </th>
                      <th class="tablefinal">
                        <div>商品分类</div>
                      </th>
                      <th class="tablefinal">
                        <div>① 年龄要求</div>
                      </th>
                      <th class="tablefinal">
                        <div>② 工作信息</div>
                      </th>
                      <th style="width: 250px; text-align: center;">
                        <div>③ 保单缴费次数 / 供房记录/供车记录/社保/公积金/工薪/个税/其他</div>
                      </th>
                      <th class="tablefinal">
                        <div>④ 结清</div>
                      </th>
                      <th class="tablefinal">
                        <div>⑤ 复效、超缴费日期</div>
                      </th>
                      <th class="tablefinal">
                        <div>⑥ 区号</div>
                      </th>
                      <th class="tablefinal">
                        <div>⑦ 配偶是否知情</div>
                      </th>
                      <th class="tablefinal">
                        <div>⑧ 是否上门考察</div>
                      </th>
                      <th class="tablefinal">
                        <div>⑨ 挂靠单位</div>
                      </th>
                      <th class="tablefinal">
                        <div>⑩ 其他</div>
                      </th>
                      <th style="width: 250px; text-align: center;">
                        <div>⑪ 征信查询次数</div>
                      </th>

                     <th class="tablefinal">
                        <div>⑫ 征信显示</div>
                      </th>
<!-- 
                      <th class="tablefinal printPage">
                        <div>操作</div>
                      </th> -->
                    </tr>
                  </thead>

             

                  <tbody id="finaltbody">

                    <tr>
                         <td class="text-center" id="goodsnmae">Savings</td>
                         <td class="text-center" id="goodsclass">Savings</td>
                         <td class="text-center" id="goods1">Savings</td>
                         <td class="text-center" id="goods2">Savings</td>
                         <td class="text-center" id="goods3">Savings</td>
                         <td class="text-center" id="goods4">Savings</td>
                         <td class="text-center" id="goods5">Savings</td>
                         <td class="text-center" id="goods6">Savings</td>
                         <td class="text-center" id="goods7">Savings</td>
                         <td class="text-center" id="goods8">Savings</td>
                         <td class="text-center" id="goods9">Savings</td>
                         <td class="text-center" id="goods10">Savings</td>
                         <td class="text-center" id="goods11">Savings</td>
                         <td class="text-center" id="goods12">Savings</td>

                    </tr>

                  </tbody>
               
           </tr>
          </table>
            </div>

            <input type="hidden" name="order_sn" id="provSelect1" value="value">

        </div>
     </div>
        <div style="height: 100px;"></div>
          <div class="layui-form-item">
            <div class="layui-input-block" style="text-align: center;">
              <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
        
        <div style="height: 100px;"></div>
 
        <!-- <script src="__JS__/screeningjs/jquery-1.4.3.min.js"></script>  -->

         <script src="__JS__/jquery.min.js?v=2.1.4"></script>

        <script src="__JS__/FileSaver.js"></script>
        <script src="__JS__/jquery.wordexport.js"></script>

        <script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
        <script src="__JS__/content.min.js?v=1.0.0"></script>

        <script src="__JS__/layui/layui.js"></script> 

      

        <script type="text/javascript">

             // 全局变量
             g_name="";

           // 引用layui
        layui.use(['layer', 'form'], function(){
          var layer = layui.layer;
          var form = layui.form;

                   //监听提交
      form.on('submit(formDemo)', function(data){

       console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}

       // var field = data.field;

        var field = JSON.stringify(data.field);

          $.ajax({

          type:"post",

          url:"highlight",

           data:'field='+field,

          success:function(data){

              console.log(data);
              if (data == 1) {

              console.log(data);
              // 带订单号跳转最终页面
              window.location.href='{:url('order/schemeinfo')}?order='+result;

              }

           }
        });


        return false;
      });


        });


            


            // 加载初始数据
           $(function(){

            $.ajax({

                type:"post",

                url:"noSelect",

                 data:{
                        'order_sn':result,

                        'versions':versions,
                    },

                success:function(data){

                    console.log(data);

                    var html = "";

                    var html2 = "";

             
                //     // 后台传过来的是 对象字符串

                //         // 将字符串 转成 Json对象

                    // var jsonObj = $.parseJSON(data);

                //     // 遍历Json对象

                    $.each(data,function(i,v){


                    // console.log(i);
                    // console.log(v);


                    
                    html+=`
                
                     <tr>
                         <td class="text-center" id="goodsnmae"><input type="number" name="veto${i}" style="width: 100%;"  placeholder="请输入" autocomplete="off" class="layui-input">
                                                   <input type="hidden" name="vetoed${i}" style="width: 100%;" value="${v.id}"></td>
                         <td class="text-center" id="goodsnmae">${v.name}</td>
                         <td class="text-center" id="goodsclass">${v.type}</td>
                         <td class="text-center" id="goods1">${v.aga}</td>
                         <td class="text-center" id="goods2">${v.job_information}</td>
                         <td class="text-center" id="goods3">${v.loan_multiples_requirements}</td>
                         <td class="text-center" id="goods4">${v.settle}</td>
                         <td class="text-center" id="goods5">${v.overpayment}</td>
                         <td class="text-center" id="goods6">${v.area}</td>
                         <td class="text-center" id="goods7">${v.know}</td>
                         <td class="text-center" id="goods8">${v.inspect}</td>
                         <td class="text-center" id="goods9">${v.hang}</td>
                         <td class="text-center" id="goods10">${v.else}</td>
                         <td class="text-center" id="goods11">${v.credit_investigation}</td>
                         <td class="text-center" id="goods12">${v.credit}</td>

                    </tr>
                       

                    `

                 })


                    // $('#cause').html(html3);
                    // $('#scheme_name').html(html2);
                    $('#finaltbody').html(html);
                   

          


                async:true


            }
            });
          


            })
          



       

 

        //获取地址栏参数，name:参数名称
        function getUrlParms(name){
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)
            return unescape(r[2]);
            return null;
        }
        // 获取订单号
        var result = getUrlParms('order');
        var versions = getUrlParms('versions');
        console.log(result);
        // console.log(typeof result);

        // 赋值订单号给input
         window.onload = function(){  

            var psel = document.getElementById("provSelect1");  
            // alert("获取到的value：" + psel.value+" ,"+$("#provSelect1").val()); //获取  
            psel.value = result; //设置  
            // alert("设置后的value：" + psel.value); //设置后的  
        };  



        </script>
    </body>
</html>
